package serviceGoods

import (
	"mxshop/app/mxshop_api/api/internal/data"
	srvGoods "mxshop/app/mxshop_api/api/internal/service/goods"
)

type serviceFactory struct {
	data data.DataFactory
}

func (sf *serviceFactory) Banner() srvGoods.BannerSrv {
	return newBanner(sf.data)
}

func (sf *serviceFactory) Brand() srvGoods.BrandSrv {
	return newBrand(sf.data)
}

func (sf *serviceFactory) Category() srvGoods.CategorySrv {
	return newCategory(sf.data)
}

func (sf *serviceFactory) CategoryBrand() srvGoods.CategoryBrandSrv {
	return newCategoryBrand(sf.data)
}

func (sf *serviceFactory) Goods() srvGoods.GoodsSrv {
	return newGoods(sf.data)
}

func NewService(store data.DataFactory) srvGoods.GoodsFactory {
	return &serviceFactory{data: store}
}
